﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucCart.ascx.cs" Inherits="GomMinhLong.AdminCP.PageUC.ucCart" %>
<h2>Thông tin đơn hàng</h2>
<asp:GridView ID="gvDonHangNonUser" runat="server" AllowPaging="True" 
    AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
    BorderStyle="None" BorderWidth="1px" CellPadding="3" 
    DataKeyNames="DonHangID" EnableViewState="False"
    Font-Names="Times New Roman" Font-Size="Medium" HorizontalAlign="Center" 
    PageSize="20" Width="100%" 
    onpageindexchanging="gvDonHangNonUser_PageIndexChanging">
    <RowStyle BorderColor="#2d2d2d" ForeColor="#000066" />
    <Columns>
        <asp:TemplateField HeaderText="STT" ItemStyle-Width="13px">
            <ItemTemplate>
                <asp:Label runat="server" ID="lbSTT" Text="<%# Container.DataItemIndex + 1 %>">
                </asp:Label>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Khách hàng">
            <ItemTemplate>
                <asp:Label ID="lblKhachHang" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Eval("HoTen") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Điện thoại">
            <ItemTemplate>
                <asp:Label ID="lblemail" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Eval("SDT") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>        
        <asp:TemplateField HeaderText="Địa chỉ giao hàng">
            <ItemTemplate>
                <asp:Label ID="lblngaydathang" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Eval("DiaChiGiaoHang") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Tổng tiền">
            <ItemTemplate>
                <asp:Label ID="lblngaygiaohang" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Bind("TongTien","{0:##,##0}") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        
        <asp:TemplateField HeaderText="Tiền Tệ">
            <ItemTemplate>
                <asp:Label ID="lblTienTe" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Bind("TienTe") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Ghi chú">
            <ItemTemplate>
                <asp:Label ID="lblngaygiaohang1" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Eval("GhiChu") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemStyle HorizontalAlign="Center" />
            <HeaderTemplate>
                <asp:Label ID="lbl10" runat="server" Text="Xử lý" />
            </HeaderTemplate>
            <ItemTemplate>
                <asp:LinkButton ID="lbtnXuLy" runat="server" 
                    CommandArgument='<%#Eval("DonHangID") %>' ForeColor="#f6a70e"
                    Text='<%#(bool)Eval("XuLy")?"Đã xử lý":"Chưa xử lý"%>'  OnCommand="lbtnXuLy_Click"
                    ToolTip="Nhấn vào đây để thay đổi tình trạng"></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>      
        <asp:TemplateField HeaderText="Chi tiết">
                <ItemTemplate>
                    <asp:HyperLink ForeColor="#003366" Style="text-decoration: underline" runat="server"
                        ID="makhkh" NavigateUrl='<%#Eval("SessionID", "~/AdminCP/Default.aspx?Page=CartDetail&sID={0}") %>'
                        Text="Chi tiết"></asp:HyperLink>
                </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Xóa bản ghi">
        <ItemTemplate>
         <asp:ImageButton ID="imgbtnDelete" runat="server" CommandArgument='<%#Eval("DonHangID") %>'
                        OnCommand="imgbtnDelete_Click" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
        </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#C75755" Font-Bold="True" ForeColor="White" 
        Height="25px" />
    <FooterStyle BackColor="White" ForeColor="#000066" />
    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
    <RowStyle ForeColor="#000066" HorizontalAlign="Center" />
</asp:GridView>